import request from "@/utils/request";

// 新增分类
export function addCategoryApi(data: any) {
  return request({
    url: "/category/add_category",
    method: "post",
    data,
  });
}

// 删除分类
export function deleteCategoryApi(data: any) {
  return request({
    url: "/category/delete_category",
    method: "delete",
    data,
  });
}

// 修改分类

// 获取分类详情
export function getCategoryApi(params: any) {
  return request({
    url: "/category/get_category",
    method: "get",
    params,
  });
}

// 分页获取分类列表
export function getCategoryList(params: any) {
  return request({
    url: "/category/get_category_list",
    method: "get",
    params,
  });
}
